<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery-3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
		$(function(){
//				$("li:contains(列表)").css("color","red")
//				$("li:has(.span)").css("color","green")
//				$("li:empty").css("color","blue")
////				$("li:parent").css("color","#ffff00")
//


              var id=$(".div").attr("data-id")
               console.log(id)
               $(".div").attr("data-id","2")
               
               var ch1 = $(":checkbox:eq(3)").attr("checked")
                console.log(typeof ch1)
                
                if (ch1==="checkbox") {
                	
                }
                //复选框***
                var ch2=$(":checkbox:eq(3)").prop("checked")
                console.log(typeof ch2)
                if (ch1===true) {
                	
                }
                $(":checkbox:eq(3)").prop("checked",false)//不选中
                
                //0 获取 1设置
                //html() html代码
                //text() 文本内容
               //val() 交互控件的值
                console.log($(".div").html()) 
                console.log($(".div").text()) 
                console.log($(".div").val()) 
                console.log($(":checkbox:eq(0)").val()) 
                $(":checkbox:eq(0)").val("2")
                $(".div").html("<h1>123</h1>")
                
			})
		
		</script>
	</head>
	<body>
		<div class="div" data-id="1">这是一个<span>div</span></div>
		<input type="checkbox" checked value="足球"/>
		<input type="checkbox" checked=""/>
		<input type="checkbox" checked="checked"/>
		<input type="checkbox" checked="8989"/>
		<!--<ul>
			<li>王二蛋</li>
			<li>李潇潇</li>
			<li><span class="span"></span>张无机</li>
			<li>许大能</li>
			<li>冯公子</li>
			<li></li>
		</ul>
		<div style="width: 100px;height: 100px; background-color: aqua; display: none;"></div>1
			<div style="width: 100px;height: 100px; background-color: antiquewhite; visibility: hidden;"></div>2
			-->
	</body>
</html>
